import request from "@/utils/request";
import { DEFAULT_HEADER } from "./common";

const apiList = {
  // 用户管理
  userManagementAdd: "/authManage000/adduser.xops", //用户管理-新增
  userManagementDel: "/authManage000/deluser.xops", //用户管理-删除
  serverQuery:"/AppMicuiserverManager/selectAppMicuiserver.xops", //微前端服务器注册查询
  serverAdd:"/AppMicuiserverManager/addAppMicuiserver.xops",  // 微前端服务器注册新增
  serverEdit:"/AppMicuiserverManager/updateAppMicuiserver.xops",  // 微前端服务器注册更新
};

// 微前端服务器注册查询
export function serverQuery(parameter: { [propName: string]: any }) {
  return request({
    url: apiList.serverQuery,
    method: "post",
    headers: {
      ...DEFAULT_HEADER,
    },
    data: parameter,
  });
}
// 微前端服务器注册新增
export function serverAdd(parameter: { [propName: string]: any }) {
  return request({
    url: apiList.serverAdd,
    method: "post",
    headers: {
      ...DEFAULT_HEADER,
    },
    data: parameter,
  });
}
//  微前端服务器注册更新
export function serverEdit(parameter: { [propName: string]: any }) {
  return request({
    url: apiList.serverEdit,
    method: "post",
    headers: {
      ...DEFAULT_HEADER,
    },
    data: parameter,
  });
}

// 批量导入用户 
// export function importExlUser(data:any) {
//   return request({
//     url: apiList.importExlUser,
//     method: "post",
//     headers: {
//       'isBigfileUpload': 'Y',
//       ...DEFAULT_HEADER,
//       'Content-Type': 'multipart/form-data;charset=UTF-8',
//     },
//     data,
//   });
// }
